package com.taotao.doctor.controller;


import com.taotao.common.core.domain.Result;
import com.taotao.doctor.service.MedDoctorReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RequestMapping("/medDoctorReview")
@RestController
public class MedDoctorReviewController {
    @Autowired
    private MedDoctorReviewService medDoctorReviewService;

    /**
     * 获取患者对医生的评论列表
     * @return
     */
    @GetMapping("/list")
    public Result list(){
       return medDoctorReviewService.list();
    }

    /**
     * 获取患者对医生的评论详情
     * 回复评论
     * @param reviewId
     * @param reviewText
     * @return
     */
    @GetMapping("/replyReview/{reviewId}/{reviewText}")
    public Result replyReview(@PathVariable Long reviewId,@PathVariable String reviewText){
        return medDoctorReviewService.replyReview(reviewId,reviewText);
    }

}
